//
//  TabarViewController.swift
//  yaokongqi
//
//  Created by HappyMilk 02 on 2017/9/26.
//  Copyright © 2017年 nike. All rights reserved.
//

import UIKit

class TabarViewController: UITabBarController {

    override func viewDidLoad() {
        super.viewDidLoad()

        let sb = UIStoryboard.init(name: "Main", bundle: nil)
        
        let home = sb.instantiateViewController(withIdentifier: "HomeViewController")
        home.tabBarItem = UITabBarItem.init(title: "", image: TABBARIMAGE(name: "t-1-nol"), selectedImage: TABBARIMAGE(name: "t-1-sel"))
        let homenav = UINavigationController.init(rootViewController: home)
        homenav.isNavigationBarHidden = true
        
        let sb1 = UIStoryboard.init(name: "news", bundle: nil)
        let two = sb1.instantiateViewController(withIdentifier: "NewsViewController")
        two.tabBarItem = UITabBarItem.init(title: "", image: TABBARIMAGE(name: "t-2-nol"), selectedImage: TABBARIMAGE(name: "t-2-sel"))
        let twonav = UINavigationController.init(rootViewController: two)
        twonav.isNavigationBarHidden = true
        
        let more = sb.instantiateViewController(withIdentifier: "MoreViewController")
        more.tabBarItem = UITabBarItem.init(title: "", image: TABBARIMAGE(name: "t-3-nol"), selectedImage: TABBARIMAGE(name: "t-3-sel"))
        let morenav = UINavigationController.init(rootViewController: more)
        morenav.isNavigationBarHidden = true
        
        self.viewControllers = [homenav,twonav,morenav]
        
    }
    
    

    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }
    

    /*
    // MARK: - Navigation

    // In a storyboard-based application, you will often want to do a little preparation before navigation
    override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
        // Get the new view controller using segue.destinationViewController.
        // Pass the selected object to the new view controller.
    }
    */

}
